﻿#ifndef MODELAPPLICATION_H
#define MODELAPPLICATION_H

#include <QMap>
#include <QWidget>
#include <QListWidgetItem>

#undef slots
#include <torch/torch.h>
#include <torch/script.h>
#define slots Q_SLOTS


namespace Ui {
class ModelApplication;
}

class ModelApplication : public QWidget
{
    Q_OBJECT
enum MediaType
{
    MEDIA_IMG,
    MEDIA_VEDIO
};

public:
    explicit ModelApplication(QWidget *parent = nullptr);
    ~ModelApplication();
    void ScanModels();
private slots:
    void on_btnadd_clicked();

    void on_btnminus_clicked();

    void on_listModels_itemDoubleClicked(QListWidgetItem *item);

    void on_btnselectimg_clicked();

    void on_btnselectdir_clicked();

    void on_listMethods_itemDoubleClicked(QListWidgetItem *item);

private:
    Ui::ModelApplication *ui;
    QMap<QString,QString> m_modelinfo;
    QString m_targetPath;
    bool m_isPath;
    MediaType m_type;
    QString m_modelsdir;
};

#endif // MODELAPPLICATION_H
